<div class="mozaic-widget widget-name_and_folder_form" data-widget="name_and_folder_form"  >
    <div class="form">
        <div data-field="name">
            <div>
                <label for="c2148_name" class="label-form">Name this stream</label>
                <div>
                    <input id="c2148_name" name="name" class="input-text" type="text">
                </div>      
                <div class="help-block">
                    The stream name will appear in the sidebar navigation as well as reports. We recommend staying away from long names so you can always read the full name.
                </div>    
            </div>
        </div>
        <div class="clear"></div>
        <div data-field="folder_id">
            <div>      
                <label for="c2148_folder_id" class="label-form">Choose a folder for this stream</label>      
                <div>
                    <select id="c2148_folder_id" name="folder_id">
                        <optgroup label="With Signals">
                            <?php
                            $folders = FolderController::loadStructure(0);
                            foreach ($folders as $folder) {
                                $folderId = $folder->folderId;
                                $folderName = $folder->folderName;
                                echo "<option value=\"$folderId\">$folderName</option>";
                                if (count($folder->child) > 0)
                                    foreach($folder->child as $childFolder) {
                                        $folderId = $childFolder->folderId;
                                        $folderName = $childFolder->folderName;
                                        echo "<option value=\"$folderId\">-- $folderName</option>";
                                    }
                            }
                            ?>
                        </optgroup>
                    </select>
                </div>
                <div class="help-block"></div>    
            </div>
        </div>
        <div class="clear"></div>

        <div class="btn-holder mt-25">
            <button class="btn btn-red commit">Save the Stream</button>
        </div>
        <form class="bbf-form">
            <fieldset>
                <legend></legend>      
                <div>
                    <div class="bbf-placeholder"></div>
                </div>    
            </fieldset>
        </form>

    </div>

</div>